<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../common/jquery/jquery-3.4.1.js"></script>
<script type="text/javascript"
	src="../common/bootstrap/bootstrap-4.4.0-dist/js/bootstrap.js"></script>
<link href="../css/basic_layout.css" rel="stylesheet" type="text/css">
<link href="../css/common_style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/commonAll.js"></script>
<script type="text/javascript" src="../js/artDialog.js"></script>
<title>信息管理系统</title>
<style>
.alt td {
	background: black !important;
}

.btn_style {
	width: 100%;
	border: none;
	text-align: center;
}
#title {
    background-color: rgb(4,63,135);
    height: 30px;
    width: 100%;
    color: white;
    text-align: center;
    font-size: 20px;
    line-height: 30px;
}
.sub_btn{
	width: 100%;
	text-align: center;
}
</style>
</head>
<body>
	<form id="submitForm" name="submitForm" action="" method="post">
		<input type="hidden" name="allIDCheck" value="" id="allIDCheck" /> <input
			type="hidden" name="fangyuanEntity.fyXqName" value="" id="fyXqName" />
		<div id="container">
			<div class="ui_content">
				<div class="ui_text_indent">
					<div id="box_border"></div>
				</div>
			</div>
			<div class="ui_content">
				<div class="ui_tb">
					<div class="row" id="title">
							请输入旧密码与新密码完成修改操作
					</div>
					<table class="table" width="100%" align="center" border="1" cellpadding="0" cellspacing="0">
						<tr>
							<td style="width: 50%;text-align: center;">旧密码</td>
							<td style="width: 50%;"><input type="text" value=""
								id="oldPassword" class="btn_style"></td>
						</tr>
						<tr>
							<td style="width: 50%;text-align: center;">新密码</td>
							<td style="width: 50%;"><input type="text" value="" 
								id="newPassword" class="btn_style"></td>
						</tr>
						<tr>
							<td style="width: 50%;text-align: center;">确认密码</td>
							<td style="width: 50%;"><input type="text" value=""
								id="confirmPassword" class="btn_style"></td>
						</tr>
					</table>
				</div>
			</div>
		</div>
	</form>
	<div class="sub_btn">
		<button onclick="modify()">提 交</button>
	</div>
</body>
<script type="text/javascript">
	function modify() {
		var data = {
			oldPassword : $("#oldPassword").val(),
			newPassword : $("#newPassword").val(),
			confirmPassword : $("#confirmPassword").val()
		}
		$.ajax({
			url : "/Teacher/modifypwd",
			method : "post",
			data : data,
			dataType : "json",
			success : function(res) {
				alert(res.message);
				if(res.message == "修改成功"){
					history.go(0);
				}
			},
			error : function(err) {
				alert("修改失败！");
			}
		})
	}
</script>
</html>
